<?php
/**
 * 城市信息
 * PHP version 7
 *
 * @address   Pay
 * @package   App\Http\Controllers\Pay
 * @author    zhengys <zhengys@boqii.net>
 * @copyright 2016-2019 guangcheng Co. All Rights Reserved.
 * @license   http://opensource.org/licenses/gpl-2.0.php GNU General Public License
 * @version   GIT:<git_id>
 * @link      http://shop.openapi.boqii.com
 */

namespace App\Http\Controllers\Common;

use Log;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Support\Collection;
use Illuminate\Http\Request;
use App\Models\Common\City;

/**
 * 城市信息
 * Class City
 *
 * @package App\Http\Controllers\City
 */
class CityController extends Controller
{
	/**
     * @var \App\Models\Common\City
    */
    private $model;
	
	/**
     * LoginController constructor.
     *
     * @param \App\Models\Common\Login
     */
    public function __construct(City $city)
    {
        $this->model = $city;
    }
	/**
	 * 获取城市
	 *
	 * @param Request $request
     * @param int     $id
     * @param string  $version
     * @access public
     * @return mixed
     */
	public function lists(Request $request, int $id, string $version = '1.0') : Collection
    {
		$result = $this->model->getCityList($request->all());
        return collect(['List'=>$result]);
	}
}